<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>学生基本信息管理</title>
    <script src="../sys/vue.min.js"></script>    
    <style>
        .red{
            color: red;
        }
    </style>
</head>
<body>
    <div id="app">
        aa{{hw}}ddd<br />
        <div style="width:150px; height:150px; background-color: red;" @click.self="alert(4)">
            <a @click.prevent="alert(3);" href="http://www.bjfu.edu.cn">北京林业大学</a>
        </div>
        <input type="text" @click="toggleRed" v-bind:class="{red:isRed}" v-model="hw" />

    </div>   

    <script>
        var vm = new Vue({
            el: "#app",
            data: {
                hw : "Hello world, 蓝海洋",
                isRed: true
            },
            methods : {
                toggleRed(){
                    this.isRed=!this.isRed
                }
            }
        });

    </script>
</body>
</html>